package com.guqj.pattern.singleton;

public class SingletonDoubleChecked {

	private volatile static SingletonDoubleChecked singleton = null;

	private SingletonDoubleChecked() {
	}

	public static SingletonDoubleChecked getInstance() {
		if (singleton == null) {
			synchronized (SingletonDoubleChecked.class) {
				if (singleton == null) {
					singleton = new SingletonDoubleChecked();
				}
			}
		}
		return singleton;
	}
}
